package com.uos.seller.service;

import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * 签名服务
 */
@Service
public class SignService {
    static Map<String,String > PUBLIC_KEYS = new HashMap<>();
    static {
        PUBLIC_KEYS.put("1000","MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC/91UoHgGjgPKpNg2oPZKHe4U1\n" +
                "Bv2pPA4h7A2WPtPWX6OhcIWXTtsZM57vlu0jIFXKYKH+aeu3Bp+d9X8a0cw50AMa\n" +
                "70DOT0yr+PE5u1zyWnqqU+va/5J+jSCBx7ur4msQYhkD5RlYMVQ//AUqI5ACArIT\n" +
                "B5U4FyS6gEyCjkT/ewIDAQAB");
    }
    /*
    根据授权编号来获取公钥
     */
    public String publicKey(String authId) {
        return PUBLIC_KEYS.get(authId);
    }
}
